package chapter10.section4;

//程序10-2 转换字节流到字符流

import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class InputStreamReaderDemo {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in, StandardCharsets.UTF_8);
        int c = 0;
        while ((c = isr.read()) != -1) {
            System.out.println((char) c);
        }
    }
}
